#include <msp430f169.h>
#include "Config.h"
#include "PWM.h"
#include "Key.h"
/**
 * main.c
 */

unsigned char key = 0;

void main(void)
{
    WDTCTL = WDTPW | WDTHOLD;   // stop watchdog timer
    Key_Portinit();
    _EINT();
//    PWM_Init(0, 1, 1, 10000, 8000);
    while(1){
        if(key == 0){
            PWM_Init(1, 1, 1, 10000, 0);
        }else if(key == 1){
            PWM_Init(1, 1, 1, 10000, 3000);
        }else if(key == 2){
            PWM_Init(1, 1, 1, 10000, 6000);
        }else if(key == 3){
            PWM_Init(1, 1, 1, 10000, 10d000);
        }
    }
}
